package com.zmn.mcc.persistence.interfaces.role;

import com.zmn.mcc.model.entity.role.McRolePermit;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author heguanghua
 * @since 2020/04/14 12:11
 */
public interface RolePermitDao {

    McRolePermit findByKey(McRolePermit rolePermit);

    List<Integer> listPermitIdByRoleId(Integer roleId);
    List<Integer> listPermitIdByRoleIds(List<Integer> roleIds);

    List<Integer> listPermitIdByStaffId(Integer staffId);

    List<McRolePermit> listPage(@Param("startIndex") Integer startIndex, @Param("pageSize") Integer pageSize);

    Integer countByQuery(McRolePermit rolePermit);


    Integer insert(McRolePermit rolePermit);

    Integer insertByBatch(List<McRolePermit> rolePermits);


    Integer deleteByKey(McRolePermit rolePermit);

    Integer deleteByQuery(McRolePermit rolePermit);
}
